
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.mebius.common.utils.LogUtils" %>
<%@ page import="java.io.PrintWriter" %>
<%@ page import="java.io.StringWriter" %>
<%@include file="/WEB-INF/jsp/common/taglibs.jspf" %>

<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>后台管理首页</title>
		<link rel="stylesheet" href="${ctx}/static/css/index/index.css">
	</head>
	<body>
		<div class="panel">
		    <%
		        LogUtils.logPageError(request);
		
		        Integer statusCode = (Integer) request.getAttribute("javax.servlet.error.status_code");
		        pageContext.setAttribute("statusCode", statusCode);
		
		        String uri = (String) request.getAttribute("javax.servlet.error.request_uri");
		        String queryString = request.getQueryString();
		        String url = uri + (queryString == null || queryString.length() == 0 ? "" : "?" + queryString);
		        pageContext.setAttribute("url", url);
		
		        Throwable exception = (Throwable) request.getAttribute("javax.servlet.error.exception");
		        request.setAttribute("exception", exception);
		
		    %>
		
		    <c:if test="${statusCode eq 404}">
		        <h3 style='display:inline;'>页面没有找到！</h3><br/>对不起，暂时没有找到您所访问的页面地址,请联系管理员解决此问题！&nbsp;&nbsp;&nbsp;&nbsp;<refresh><a href='${url}' class='btn btn-danger'>刷新,看看是否能访问了</a></refresh>"
		    </c:if>
		
		    <c:if test="${statusCode ne 404}">
		        <h3 style='display:inline;'>服务器程序出问题了！</h3><br/>对不起,您访问的页面出了一点内部小问题，刷新重新访问或先去别的页面转转,过会再来吧~！&nbsp;&nbsp;&nbsp;&nbsp;<refresh><a href='${url}' class='btn btn-danger'>刷新,看看是否能访问了</a></refresh>
		        <c:if test="${not empty exception}">
		            <%
		                StringWriter stringWriter = new StringWriter();
		                PrintWriter printWriter = new PrintWriter(stringWriter);
		                exception.printStackTrace(printWriter);
		                pageContext.setAttribute("stackTrace", stringWriter.toString());
		            %>
		            <%@include file="exceptionDetails.jsp"%>
		        </c:if>
		    </c:if>
		
		
		
		</div>
	</body>
</html>
